<template>
  <div class="icons-container">

    <el-table
      :data="tableData"
      style="width: 100%">
      <el-table-column
        prop="date"
        label="日期"
        width="150">
      </el-table-column>

      <el-table-column label="出牌信息">
        <el-table-column label="闲">
          <el-table-column
            prop="province"
            label="1"
            width="80">
          </el-table-column>
          <el-table-column
            prop="city"
            label="2"
            width="80">
          </el-table-column>
          <el-table-column
            prop="city"
            label="3"
            width="80">
          </el-table-column>
          <el-table-column
            prop="city"
            label="4"
            width="80">
          </el-table-column>
        </el-table-column>

        <el-table-column label="庄">
          <el-table-column
            prop="province"
            label="1"
            width="80">
          </el-table-column>
          <el-table-column
            prop="city"
            label="2"
            width="80">
          </el-table-column>
          <el-table-column
            prop="city"
            label="3"
            width="80">
          </el-table-column>
          <el-table-column
            prop="city"
            label="4"
            width="80">
          </el-table-column>
        </el-table-column>
      </el-table-column>
    </el-table>


  </div>
</template>

<script>
import clipboard from '@/utils/clipboard'
import svgIcons from './svg-icons'
import elementIcons from './element-icons'

export default {
  name: 'Icons',
  data() {
    return {
      svgIcons,
      elementIcons,
      tableData: [{
        date: '2016-05-02',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄'
      }, {
        date: '2016-05-04',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1517 弄'
      }, {
        date: '2016-05-01',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1519 弄'
      }, {
        date: '2016-05-03',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1516 弄'
      }]
    }
  },
  methods: {
    generateIconCode(symbol) {
      return `<svg-icon icon-class="${symbol}" />`
    },
    generateElementIconCode(symbol) {
      return `<i class="el-icon-${symbol}" />`
    },
    handleClipboard(text, event) {
      clipboard(text, event)
    }
  }
}
</script>

<style lang="scss" scoped>
.icons-container {
  margin: 10px 20px 0;
  overflow: hidden;

  .grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .icon-item {
    margin: 20px;
    height: 85px;
    text-align: center;
    width: 100px;
    float: left;
    font-size: 30px;
    color: #24292e;
    cursor: pointer;
  }

  span {
    display: block;
    font-size: 16px;
    margin-top: 10px;
  }

  .disabled {
    pointer-events: none;
  }
}
</style>
